<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>RoubSite后台管理</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<script type="text/javascript">
	var zTreeObj;
	var setting = {
			view : {
				dblClickExpand : false
			},
			data : {
				simpleData : {
						enable : true,
						idKey : "id",
						pIdKey : "pId",
						rootPId : 0
				}
			},
			callback : {
					beforeClick : function(treeId, treeNode) {
						var zTree = $.fn.zTree.getZTreeObj("organTree");
						if (treeNode.isParent) {
							zTree.expandNode(treeNode);
							return false;
						} else {
							showInfo(treeNode.id);
							return false;
						}
					},
					onRightClick : function(event, treeId, treeNode) {
						var zTree = $.fn.zTree.getZTreeObj("organTree");
						if (!treeNode && event.target.tagName.toLowerCase() != "button"
								&& $(event.target).parents("a").length == 0) {
							zTree.cancelSelectedNode();
							showRMenu("root", event.clientX, event.clientY);
						} else if (treeNode && !treeNode.noR) {
							zTree.selectNode(treeNode);
							showRMenu("node", event.clientX, event.clientY);
						}
					}

			}
	};
</script>
<script src="{$__WEBPATH__}/static/common/js/roubSite.js"></script>
<script type="text/javascript">
	RS.webPath = '{$__WEBPATH__}';
</script>
<script src="{$__WEBPATH__}/static/common/js/import.js"></script>
<style type="text/css">
div#rMenu {
	position: absolute;
	visibility: hidden;
	top: 0;
	text-align: left;
	padding: 2px;
}

div#rMenu ul li {
	margin: 1px 0;
	padding: 0 5px;
	cursor: pointer;
	list-style: none outside none;
}

.dropdown-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 1000;
	display: none;
	float: left;
	min-width: 160px;
	padding: 5px 0;
	margin: 2px 0 0;
	font-size: 14px;
	text-align: left;
	list-style: none;
	background-color: #fff;
	-webkit-background-clip: padding-box;
	background-clip: padding-box;
	border: 1px solid #ccc;
	border: 1px solid rgba(0, 0, 0, .15);
	border-radius: 4px;
	-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
	box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
}

.dropdown-menu .divider {
	height: 1px;
	margin: 9px 0;
	overflow: hidden;
	background-color: #e5e5e5;
}

.dropdown-menu>li>a {
	display: block;
	padding: 3px 20px;
	clear: both;
	font-weight: 400;
	line-height: 1.42857143;
	color: #333;
	white-space: nowrap;
}

.dropdown-menu>li>a:hover, .dropdown-menu>li>a:focus {
	color: #262626;
	text-decoration: none;
	background-color: #f5f5f5;
}
</style>
<script type="text/javascript">
	function reinitIframe() {
		var iframe = document.getElementById("infoIframe");
		try {
			var bHeight = iframe.contentWindow.document.body.scrollHeight;
			var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
			var height = Math.max(bHeight, dHeight);
			iframe.height = height;
		} catch (ex) {

		}
	}
</script>
</head>
<body>


	<!--主要内容begin-->
	<script src="{$__WEBPATH__}/static/admin/rsOrgan/js/listRsOrgan.js"></script>
	<div class="layui-fluid">
		<div class="layui-card">
			<div class="layui-card-header">机构管理</div>
			<div class='layui-card-body'>
				<div class="layui-row layui-col-space15">
					<div class="layui-col-md2">
						<ul id="organTree" class="ztree"></ul>
					</div>
					<div class="layui-col-md10">
						<iframe id="infoIframe" src='about:blank' onload="reinitIframe()" width="100%" height="100%" frameborder="0"></iframe>
					</div>
				</div>
			</div>
		</div>
	</div>

	<!-- 右键菜单 -->
	<div id="rMenu" style="width: 120px;">
		<ul class="dropdown-menu" role="menu">
			<li onclick="clickMenu('new')"><a tabindex="-1">增加下级</a></li>
			<li onclick="clickMenu('edit')"><a tabindex="-1">编辑</a></li>
			<li class="divider"></li>
			<li onclick="clickMenu('del')"><a tabindex="-1">删除</a></li>
		</ul>
	</div>


	<!--主要内容end-->
</body>
</html>

